home *** CD-ROM | disk | FTP | other *** search
- /* %filename% -- modeless dialog */
- /* Created %date% %time% by AppMaker */
-
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Controls.h>
- #include <Dialogs.h>
- #include <Events.h>
- #include <Lists.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include "ResourceDefs.h"
- #include "Miscellany.h"
- #include "DialogAids.h"
- #include "WindowAids.h"
- #include "%dlogname%.h"
-
- DialogPtr %dlogname%Dialog;
-
- %for each item gen itemNr%
-
- %If lang = MPW%
- #pragma segment %dlogname%
-
- %endif%
- %for each item gen auxiliaryProto%
-
- %push needsRefCon%
- %for each item gen auxiliary%
- /*----------*/
- void Init%dlogname% ()
- {
- DialogPtr theDialog;
- Ptr %dlogname%Data;
- register %dlogname%RecPtr info;
-
- %dlogname%Dialog = GetNewDialog (%dlogname%ID, nil, (WindowPtr) -1L);
- theDialog = %dlogname%Dialog;
- SetPort (theDialog);
- %dlogname%Data = NewPtr (sizeof (%dlogname%Rec));
- SetWRefCon (theDialog, (long) %dlogname%Data);
- info = (%dlogname%RecPtr) %dlogname%Data;
- %for each item gen init field%
-
- %for each item gen set%
-
- %for each item gen enable%
-
- } /*Init%dlogname%*/
-
- /*----------*/
- void Do%dlogname% ()
- {
- if (%dlogname%Dialog != nil) {
- SelectWindow (%dlogname%Dialog);
- ShowWindow (%dlogname%Dialog);
- }
- } /*Do%dlogname%*/
-
- /*----------*/
- void Close%dlogname% ()
- {
- HideWindow (%dlogname%Dialog);
- } /*Close%dlogname%*/
-
- /*----------*/
- Boolean Filter%dlogname%% %(DialogPtr whichDialog,
- EventRecord *event,
- short *itemHit)
- {
- Boolean filtered;
- %dlogname%RecPtr% %data;
-
- #pragma unused (data)
-
- filtered = false;
- %for each item gen filter%
-
- if (!filtered) {
- filtered = StandardFilter (whichDialog, event, itemHit);
- }
- return (filtered);
- } /*Filter%dlogname%*/
-
- /*----------*/
- void Do%dlogname%Item (short itemNr)
- {
- DialogPtr theDialog;
- register %dlogname%RecPtr info;
-
- theDialog = %dlogname%Dialog;
- SetPort (theDialog);
- info = (%dlogname%RecPtr) GetWRefCon (theDialog);
- switch (itemNr) {
- %for each item gen hit%
-
- } /*switch*/
- %for each item gen enable%
-
- } /*Do%dlogname%Item*/
-
- /* %dlogname% */
- %pop needsRefCon%
-